$(function(){

	console.log($('#graph'))
	$('#graph').css('width','800px');
	$('#graph').css('height','400px');
var tmpNode = {
        name:'test',
        symbolSize:'50',
        //symbol:'image://icon5_1.png',
        value:'10',
        x:200,
        y:120,
        draggable:true,
        itemStyle:{
            normal:{
                color:"steelblue",
            }
        }
    }
    var tmpNode1 = {
        name:'test1',
        symbolSize:'50',
        //symbol:'image://icon5_1.png',
        value:'10',
        x:300,
        y:120,
        draggable:true,
        itemStyle:{
            normal:{
                color:"steelblue",
            }
        }
    }
    var tmpNode2 = {
        name:'test2',
        symbolSize:'50',
        //symbol:'image://icon5_1.png',
        value:'10',
        x:250,
        y:120,
        draggable:true,
        itemStyle:{
            normal:{
                color:"steelblue",
            }
        }
    }
    var nodes = [];
    var links = [];
    nodes.push(tmpNode);
    nodes.push(tmpNode1);
    nodes.push(tmpNode2);
    links.push({target:'test2',source:'test'},{target:'test1',source:'test2'})
	var forceChart = echarts.init($('#graph')[0]);
forceoption = {
        title: {
            text: '引力布局',
            
        },
        tooltip: {},
        animation: false,
        label: {
                normal: {
                    show: true
                }
            },
        series : [
            {
                name: '引力布局',
                type: 'graph',
                layout: 'none',
                /*layout: 'force',*/
                data: nodes,
                links:links,//[{
                roam: true,
                label: {
                    normal: {
                        position: 'right'
                    }
                },
                force: {
                    //repulsion: 500
                }
            }
        ]
    };
forceChart.setOption(forceoption);
})